package designmodel.builder.经典建造者模式;

/**
 *
 * @author scylla
 * @version V1.0
 * @project echo-java-base
 * @title Mac实际建造者
 * @package designmodel.builder.经典建造者模式
 * @since 2021/12/15 6:00 下午
 */
public class ConcretMacBuilder extends ComputerBuilder {

    private Computer computer;

    public ConcretMacBuilder() {
        computer = new Computer("Intel", "Doch.");
    }

    @Override
    public Computer getComputer() {
        return computer;
    }

    @Override
    public ComputerBuilder usbCount() {
        computer.setUsbCount(4);
        return this;
    }

    @Override
    public ComputerBuilder keyboard() {
        computer.setKeyboard("mac 键盘");
        return this;
    }

    @Override
    public ComputerBuilder display() {
        computer.setDisplay("mac 显示器");
        return this;
    }
}
